package com.xiaoke.domain.entity;

import com.xiaoke.enums.BusinessType;

/**
 * @Author xiaoke
 * @Description 操作日志记录表
 * @Date 2023/7/23 19:38
 */
public class SysLog {
    private static final long serialVersionUID = 1L;
    private Long id;
    /**
     * 操作模块
     */
    private String title;
    /**
     * 业务类型
     */
    private BusinessType businessType;
    /**
     * 请求类型
     */
    private String requestMethod;
    /**
     * 请求URl
     */
    private String operUrl;
    /**
     * 请求IP
     */
    private String operIp;
    /**
     * 请求参数
     */
    private String operParam;
    /**
     * 消耗时间-ms
     */
    private Long costTime;
    public SysLog() {
    }
    public SysLog(Long id, String title, BusinessType businessType, String requestMethod, String operUrl, String operIp, String operParam, Long costTime) {
        this.id = id;
        this.title = title;
        this.businessType = businessType;
        this.requestMethod = requestMethod;
        this.operUrl = operUrl;
        this.operIp = operIp;
        this.operParam = operParam;
        this.costTime = costTime;
    }

    public SysLog(String title, BusinessType businessType, String requestMethod, String operUrl, String operIp, String operParam, Long costTime) {
        this.title = title;
        this.businessType = businessType;
        this.requestMethod = requestMethod;
        this.operUrl = operUrl;
        this.operIp = operIp;
        this.operParam = operParam;
        this.costTime = costTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public BusinessType getBusinessType() {
        return businessType;
    }

    public void setBusinessType(BusinessType businessType) {
        this.businessType = businessType;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getOperUrl() {
        return operUrl;
    }

    public void setOperUrl(String operUrl) {
        this.operUrl = operUrl;
    }

    public String getOperIp() {
        return operIp;
    }

    public void setOperIp(String operIp) {
        this.operIp = operIp;
    }

    public String getOperParam() {
        return operParam;
    }

    public void setOperParam(String operParam) {
        this.operParam = operParam;
    }

    public Long getCostTime() {
        return costTime;
    }

    public void setCostTime(Long costTime) {
        this.costTime = costTime;
    }

    @Override
    public String toString() {
        return "SysLog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", businessType=" + businessType +
                ", requestMethod='" + requestMethod + '\'' +
                ", operUrl='" + operUrl + '\'' +
                ", operIp='" + operIp + '\'' +
                ", operParam='" + operParam + '\'' +
                ", costTime=" + costTime +
                '}';
    }
}
